function plotcloth(array,Restlength)
% Plot the cloth and a globe

% Cloth
tensor=array2tensor(array);
X=tensor(:,:,1);
Y=tensor(:,:,2);
Z=tensor(:,:,3);

hold on
grid on
% Globe
[x,y,z]=sphere;
C=zeros(size(x));

% Plotting
cla
surf(2.*x,2.*y,2.*z,'FaceColor','none');
surfcloth(X,Y,Z,Restlength);
hold off